﻿using System;
using System.Collections.Generic;
using System.Text;

using Peradigm.Framework.Domain.Security;
using Peradigm.Framework.Persistence;

using Liberty.Domain.CaseManagement;
using Liberty.Domain.GrantManagement;
using Liberty.Domain.ServiceMemberManagement;

namespace Liberty.Domain.ApprovalManagement
{
    [Serializable]
    public class Event : PersistentModel
    {
        #region Constants
        #endregion

        #region Event Handlers
        #endregion

        #region Methods

        #endregion

        #region Properties
        public Activity Activity
        {
            get
            {
                return i_Activity;
            }
            set
            {
                i_Activity = value;
            }
        }

        public User CreatedBy
        {
            get { return i_CreatedBy; }
            set { i_CreatedBy = value; }
        }

        public User CompletedBy
        {
            get { return i_CompletedBy; }
            set { i_CompletedBy = value; }
        }

        public string Note
        {
            get
            {
                return i_Note;
            }
            set
            {
                i_Note = value;
            }
        }

        public DateTime OccuredOn
        {
            get
            {
                return i_OccurredOn;
            }
         }
        public DateTime CompletedOn
        {
            get
            {
                return i_CompletedOn;
            }
            set
            {
                i_CompletedOn = value;
            }
        }
        #endregion

        #region Private Methods
        #endregion

        #region Private Properties
        #endregion

        #region Construction and Finalization
        /// <summary>
        /// Creates a stubbed event populated with frequently used primitives.  
        /// Other aggregated objects are not populated by this factory method.
        /// </summary>
        /// <returns></returns>
        public static Event TestInstance()
        {
            Event stub = new Event();
           // stub.OccuredOn = DateTime.Now;
            stub.Note = "Some notes in the Notes Description.  Should this be a Note object??";
           // stub.OccuredOn = DateTime.Now;
            stub.Oid = 12L;

            return stub;
        }

        public Event()
        {
        }

        public Event(Activity action, DateTime occurredOn, User createdBy)
            : this(PersistentModel.NEW_OID, PersistentModel.NEW_VERSION, action, occurredOn, createdBy)
        {
        }

        public Event(long oid, byte[] rowLock, Activity action, DateTime occurredOn, User createdBy)
            : base(oid, rowLock)
        {
            this.CreatedBy = createdBy;
            this.Activity = action;
            i_OccurredOn = occurredOn;
        }
        #endregion

        #region Data Elements
        private Activity i_Activity;
        private User i_CreatedBy;
        private User i_CompletedBy;
        private string i_Note;
        private DateTime i_OccurredOn;
        private DateTime i_CompletedOn;
        #endregion
    }
}
